package lotus.blog.lotusblog.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import lotus.blog.lotusblog.pojo.Comment;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface CommentMapper extends BaseMapper<Comment> {
    @Select("select username,avatar,comment.* from comment,user where article_id=#{article_id} and comment.user_id=user.id")
    public List<Map<String,Object>> getCommentList(@Param("article_id") int articleId);
}
